package akatsuki.janalyzercode.view;

import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.*;
import org.eclipse.ui.internal.dialogs.*;
import org.eclipse.ui.part.ViewPart;

public class JAnalyzerCodeView extends ViewPart {
	private TableColumn colTipoWarning;
	private TableColumn colNumeroRegla;
	private TableColumn colNumeroLinea;
	TableViewer viewer;
	
	//public static final String ID = "akatsuki.janalyzercode.view.JAnalyzerCodeView";
	public static final String ID = "com.example.helloworld.view.helloworldview";
	
	public JAnalyzerCodeView() {
		// TODO Auto-generated constructor stub	
					
	}	

	@SuppressWarnings("restriction")
	@Override
	public void createPartControl(Composite parent) {
		// TODO Auto-generated method stub
		//Label label = new Label(parent, SWT.WRAP);
		//label.setText("Resultados");
		
		viewer = new TableViewer(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION);
		final Table table = viewer.getTable();
		
		colTipoWarning = new TableColumn(table, SWT.LEFT);
		colTipoWarning.setText("");
		colTipoWarning.setWidth(18);
		
		colNumeroRegla = new TableColumn(table, SWT.LEFT);
		colNumeroRegla.setText("Name");
		colNumeroRegla.setWidth(200);
		
		colNumeroLinea = new TableColumn(table, SWT.LEFT);
		colNumeroLinea.setText("Location");
		colNumeroLinea.setWidth(450);
		
		table.setHeaderVisible(true);
		table.setLinesVisible(false);
		
		viewer.setContentProvider(new ViewContentProvider());
		//viewer.setLabelProvider(new ViewLabelProvider());
		//viewer.setInput(getViewSite());
		
		
	}

	@Override
	public void setFocus() {
		// TODO Auto-generated method stub
		//viewer.getControl().setFocus();

	}
}
